package com.sxbbc.common.basics.utils.token;

import org.apache.commons.lang3.StringUtils;

import javax.servlet.http.HttpServletRequest;

/**
 * token工具类
 *
 * @author leehao
 * @date 2019-07-13
 */
public class TokenUtils {

    public static String getToken(HttpServletRequest request){
        //从请求头获取token
        String token = request.getHeader("Authorization");
        if (StringUtils.isNotBlank(token)) {
            return token;
        }
        return null;
    }
}
